package com.example.demo_mysql_mybatisplus.mybatisplus.services.impl.dynamic;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo_mysql_mybatisplus.mybatisplus.daos.UserMapper;
import com.example.demo_mysql_mybatisplus.mybatisplus.entitys.User;
import org.springframework.stereotype.Service;


@DS( "slave_1" )
@Service
public class Ds1ServiceImpl extends ServiceImpl<UserMapper, User> {

    public User getUser(){
        return this.getBaseMapper().selectById(1);
    }

}
